﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Trans.car
{
    public partial class Manage_maintain : Form
    {
        public Manage_maintain()
        {
            InitializeComponent();
        }

        private void Manage_maintain_Load(object sender, EventArgs e)
        {
           
            this.tb_maintainTableAdapter.Fill(this.dataSet.tb_maintain);

        }

        private void bt_save_Click(object sender, EventArgs e)
        {
            try
            {

                tbmaintainBindingSource.EndEdit();
                tb_maintainTableAdapter.Update(dataSet.tb_maintain);
                this.Close(); 
                MessageBox.Show("保存成功", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show("出错啦" + ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void bt_cancel_Click(object sender, EventArgs e)
        {
            tbmaintainBindingSource.CancelEdit();
            this.Close();
        }

        private void textBoxX6_TextChanged(object sender, EventArgs e)
        {

        }

        private void gv_customer_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
        {
            session.Color_Const.set_gv_color(gv_customer);
        }
    }
}
